package com.tedu.feign;

import com.tedu.pojo.Item;
import com.tedu.pojo.User;
import com.tedu.util.JsonResult;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author Song
 * @since 2020/11/26
 */
@Component
public class UserClientFb implements UserClient{
    @Override
    public JsonResult<User> getUser(Integer userId) {
        if (Math.random()<0.5){

            return JsonResult.ok(new User(1,"123456","123456"));
        }
        return JsonResult.err("错误");
    }

    @Override
    public JsonResult addScore(Integer userId, Integer score) {
        return JsonResult.err("错误");
    }
}
